package ar.com.fiuba.ElectronicCircuitAnalyst.domain.api;

import ar.com.fiuba.ElectronicCircuitAnalyst.application.api.ComponentDto;
import ar.com.fiuba.ElectronicCircuitAnalyst.domain.exceptions.InvalidCircuitElementException;

/**
 * Interface for a component factory.
 * 
 */
public interface ComponentFactory {

	/**
	 * Method to make a Component with the parameters provided.
	 * 
	 * @param data
	 *            DTO containing the information to be used to create the
	 *            Component.
	 * @return the new instance.
	 * @throws InvalidCircuitElementException
	 *             if parameters provided result in an invalid component.
	 */
	public Component makeComponent(ComponentDto data) throws InvalidCircuitElementException;

}
